$os: "" !default;
$theme: "" !default;

body {
  padding: 0 !important;
  margin: 0 !important;
  // line-height: var(--base-line-height);
  /* counter-reset: tableHead 0 imgHead 0; */
  @if $theme == "dark" {
    color: #dddddd;
    background-color: #1e1e1e;
  }
}

@media print {
  #write {
    padding: 0 !important;
  }
  h2 {
    break-before: var(--page-break-before-h2);
  }
  h2:first-of-type {
    break-before: avoid-page;
  }
  @page {
    margin: 1.8cm 2cm 1.2cm 2cm !important; /* 页边距 */
  }
}

#write {
  font-family: var(--base-latin-font), var(--base-chinese-font), serif;
  font-size: var(--base-font-size);
  /* A4标准宽度 */
  max-width: 21cm;
  @if $theme == "light" {
    background-color: white;
  } @else if $theme == "dark" {
    background-color: #1e1e1e;
  }
  /* column-count: 2;
    column-gap: 25px;
    column-width: 8cm; 
    display: inline-block; */
  /* 这里可以试分栏的，但确实不适合实现 */

  .md-math-block,
  .md-rawblock,
  p {
    margin-top: 1em;
    margin-bottom: 1em;
  }
  p {
    text-align: left;
    line-height: var(--base-line-height);
  }

  // 超链接
  @if $theme == "light" {
    a {
      color: var(--link-color-light);
    }
  } @else if $theme == "dark" {
    a {
      color: var(--link-color-dark);
    }
  }
}

hr {
  @if $theme == "light" {
    border-top: solid 1px #ddd;
  } @else if $theme == "dark" {
    border-top: solid 1px #888888;
  }
  margin-top: 1.8em;
  margin-bottom: 1.8em;
}

img {
  /* 避免图片在导出时被断开 */
  break-inside: avoid-page;
}

strong {
  font-weight: var(--strong-weight);
}
